const fs = require('fs');
const path = require('path');



fs.readFile(path.join(__dirname, '成绩.txt'), 'utf-8', (err, data) => {
    if (err) { console.log(err) };

    data = data.replace(/=/g, ':');
    data = data.replace(/\s/g, '\n');
    // console.log(data)
    fs.writeFile(path.join(__dirname, '已整好的成绩.txt'), data, err => {
        if (err) { console.log('写入文件失败') };
        console.log('成绩整理完成')
    })
})